home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
AmiTCPsdk_40.lha
/
AmiTCP-4.0
/
src
/
netlib
/
iomode.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-29
|
679b
|
37 lines
RCS_ID_C="$Id: iomode.c,v 4.1 1994/09/29 23:09:02 jraja Exp $";
/*
* iomode.c - set file io mode (normal or translated) (SAS/C)
*
* Copyright © 1994 AmiTCP/IP Group,
* Network Solutions Development Inc.
* All rights reserved.
*/
#include <ios1.h>
#include <stdlib.h>
int
iomode(int fd, int mode)
{
struct UFB *ufb;
/*
* find the ufb *
*/
if ((ufb = __chkufb(fd)) == NULL) {
return -1;
}
/*
* Set the translation mode
*
* mode == 0 - translate mode on
* mode == 1 - translate mode off
*/
if (mode)
ufb->ufbflg &= ~UFB_XLAT;
else
ufb->ufbflg |= UFB_XLAT;
return 0;
}